package com.javaclimb.music.service.impl;

import com.javaclimb.music.dao.ConsumerMapper;
import com.javaclimb.music.domain.Consumer;
import com.javaclimb.music.service.ConsumerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ConsumerServiceImpl implements ConsumerService {
    @Autowired
    private ConsumerMapper consumerMapper;

    @Override
    public List<Consumer> selectAll() {
        return consumerMapper.selectAll();
    }

    @Override
    public int deleteUser(Integer id) {
        return consumerMapper.deleteUser(id);
    }

    @Override
    public List<Consumer> selectName(String name) {
        return consumerMapper.selectName(name);
    }

    @Override
    public int insertUser(Consumer consumer) {
        return consumerMapper.insertUser(consumer);
    }

    @Override
    public int updateUser(Consumer consumer) {
        return consumerMapper.updateUser(consumer);
    }
}
